package com.codeoss.module.purchase.pagebean;

import java.math.BigDecimal;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.codeoss.framework.view.pagebean.mobile.MFormViewPageBean;
import com.codeoss.module.purchase.service.IPurchaseOrderService;

@Service("mPurchaseOrderFormViewPageBean")
public class MPurchaseOrderFormViewPageBean extends MFormViewPageBean {
	@Autowired
	private IPurchaseOrderService purchaseOrderService;
	
	public BigDecimal calculateAmountTotal() {
		Long keyValue=(Long)getCurrentKeyValue();
		return purchaseOrderService.calculateAmountTotal(keyValue);
	}
	
	public BigDecimal calculateAmountUntaxed() {
		Long keyValue=(Long)getCurrentKeyValue();
		return purchaseOrderService.calculateAmountUntaxed(keyValue);
	}
	
	public BigDecimal calculateAmountTax() {
		Long keyValue=(Long)getCurrentKeyValue();
		return purchaseOrderService.calculateAmountTax(keyValue);
	}
}
